import http from '@/utils/http'


export type setMessageDto = {
  readonly content: string
}


export type Message = {
  readonly content: string
  readonly time: Date
}

export type GetMessages = Message[]



export const setMessage = (data: setMessageDto) => http.post('/api/setMessage', data)

export const getMessages = () => http.get<GetMessages>('/api/getMessages')